package com.ophiux.cs.api;

import org.springframework.beans.factory.annotation.Autowired;

import com.ophiux.cs.api.aop.CheckSign;
import com.ophiux.cs.api.aop.CheckToken;
import com.ophiux.cs.api.appraise.port.IAppraiseApiPort;
import com.ophiux.cs.api.chat.port.ICSUserApiPort;
import com.ophiux.cs.api.consult.port.ICSChatApiPort;
import com.ophiux.cs.api.consultBase.port.IDeptApiPort;
import com.ophiux.cs.api.consultBase.port.IDeptSortsApiPort;
import com.ophiux.cs.api.consultBase.port.IDoctorApiPort;
import com.ophiux.cs.api.consultBase.port.IFocusApiPort;
import com.ophiux.cs.api.consultBase.port.IHospitalApiPort;
import com.ophiux.cs.api.consultOrder.port.IConsultOrderApiPort;
import com.ophiux.cs.api.module01.port.IHelloWorldPort;
import com.ophiux.cs.api.user.port.IPatientApiPort;
import com.ophiux.cs.api.user.port.IUserApiPort;


public class OphiuxCSOnlineService implements IOphiuxCSOnlinePort {
	@Autowired
	IHelloWorldPort helloWorldPort;
	@Autowired
	IUserApiPort userApiPort;
	@Autowired
    IHospitalApiPort hospitalApiPort;
	@Autowired
	IConsultOrderApiPort consultOrderApiPort;
	@Autowired
	IPatientApiPort patientApiPort;
	@Autowired
	IDeptApiPort deptApiPort;
	@Autowired
	IDeptSortsApiPort deptSortsApiPort;
	@Autowired
	IDoctorApiPort doctorApiPort;
	@Autowired
	IFocusApiPort focusApiPort;
	@Autowired
	IAppraiseApiPort appraiseApiPort;
	
	@Autowired
	ICSUserApiPort cSUserApiService;
	@Autowired
	ICSChatApiPort cSChatApiService;
	
//	@Autowired
//    private MessageSender kafkaSender;
	
	@Override
	public String getHello(String data) {
		String result = helloWorldPort.getHello(data);
		return result;
	}

	@Override
	@CheckSign
	public String Login(String data) {
		
//		kafkaSender.send();
		String result = userApiPort.Login(data);
		return result;
	}

	@Override
	@CheckSign
	@CheckToken
	public String P_GetUserInfo(String data) {
		String result = userApiPort.P_GetUserInfo(data);
		return result;
	}

	@Override
	@CheckSign
	public String P_Register(String data) {
		String result = userApiPort.P_Register(data);
		return result;
	}

	
	
	@Override
    @CheckSign
	public String createHospital(String data) {
        String result = hospitalApiPort.createHospital(data);
        return result;
	}

	@Override
	@CheckSign
	public String getHospital(String data) {
		String result = hospitalApiPort.getHospital(data);
		return result;
	}

	@Override
	@CheckSign
	public String updateHospital(String data) {
		String result = hospitalApiPort.updateHospital(data);
		return result;
	}

	@Override
	@CheckSign
	public String deleteHospital(String data) {
		String result = hospitalApiPort.deleteHospital(data);
		return result;
	}

	@Override
    @CheckSign
	public String ApplayCSPublish(String data) {
		return consultOrderApiPort.ApplayCSPublish(data);
	}

	@Override
    @CheckSign
	public String DoctorOrderCS(String data) {
		return consultOrderApiPort.DoctorOrderCS(data);
	}

	@Override
    @CheckSign
	public String GetCSOrderRecords(String data) {
		return consultOrderApiPort.GetCSOrderRecords(data);
	}

	@Override
    @CheckSign
	public String getUserPatients(String data) {
		return patientApiPort.getUserPatients(data);
	}

	@Override
    @CheckSign
	public String AddUserPatient(String data) {
		return patientApiPort.AddUserPatient(data);
	}

	@Override
    @CheckSign
	public String UpdateUserPatient(String data) {
		return patientApiPort.UpdateUserPatient(data);
	}

	@Override
    @CheckSign
	public String deleteUserPatient(String data) {
		return patientApiPort.deleteUserPatient(data);
	}

	@Override
    @CheckSign
	public String getDept(String data) {
		return deptApiPort.getDept(data);
	}

	@Override
	@CheckSign
	public String createDepartMent(String data) {
		return deptApiPort.createDepartMent(data);
	}

	@Override
    @CheckSign
	public String updateDept(String data) {
		return deptApiPort.updateDept(data);
	}

	@Override
    @CheckSign
	public String deleteDept(String data) {
		return deptApiPort.deleteDept(data);
	}

	@Override
    @CheckSign
	public String GetDeptSorts(String data) {
		return deptSortsApiPort.GetDeptSorts(data);
	}

	@Override
    @CheckSign
	public String createSorts(String data) {
		return deptSortsApiPort.createSorts(data);
	}

	@Override
    @CheckSign
	public String updateDeptSorts(String data) {
		return deptSortsApiPort.updateDeptSorts(data);
	}

	@Override
    @CheckSign
	public String deleteDeptSorts(String data) {
		return deptSortsApiPort.deleteDeptSorts(data);
	}

	@Override
    @CheckSign
	public String getDoctor(String data) {
		return doctorApiPort.getDoctor(data);
	}

	@Override
    @CheckSign
	public String createDoctor(String data) {
		return doctorApiPort.createDoctor(data);
	}

	@Override
    @CheckSign
	public String updateDoctor(String data) {
		return doctorApiPort.updateDoctor(data);
	}

	@Override
    @CheckSign
	public String deleteDoctor(String data) {
		return doctorApiPort.deleteDoctor(data);
	}

	@Override
    @CheckSign
	public String GetCSDoctors(String data) {
		return doctorApiPort.GetCSDoctors(data);
	}

	@Override
    @CheckSign
	public String GetCSDoctorInfoByID(String data) {
		return doctorApiPort.GetCSDoctorInfoByID(data); 
	}

	@Override
	public String Focus(String data) {
		return focusApiPort.Focus(data);
	}

	@Override
	public String GetFocusDoctors(String data) {
		return focusApiPort.GetFocusDoctors(data);
	}

	@Override
	@CheckSign
	@CheckToken
	public String UpdateUserInfo(String data) {
		return userApiPort.UpdateUserInfo(data);
	}

	@Override
	@CheckSign
	public String D_Register(String data) {
		return userApiPort.D_Register(data);
	}

	@Override
    @CheckSign
	public String GetCSDoctorAppraiseMaster(String data) {
		return appraiseApiPort.GetCSDoctorAppraiseMaster(data);
	}

	@Override
    @CheckSign
	public String GetCSDoctorAppraiseDetails(String data) {
		return appraiseApiPort.GetCSDoctorAppraiseDetails(data);
	}

	@Override
    @CheckSign
	public String appraiseOrder(String data) {
		return appraiseApiPort.appraiseOrder(data);
	}

	@Override
	public String D_GetDoctorUserInfo(String data) {
		return userApiPort.D_GetDoctorUserInfo(data);
	}

	@Override
	public String GetCertificateType(String data) {
		return patientApiPort.GetCertificateType(data);
	}

	@Override
	public String GetCSOrderRecordsDetail(String data) {
		return consultOrderApiPort.GetCSOrderRecordsDetail(data);
	}

	@Override
	public String SendCSMessage(String data) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String GetCSChatMessages(String data) {
		return cSChatApiService.GetCSChatMessages(data);
	}

	@Override
	public String ReadCSMessage(String data) {
		return cSChatApiService.ReadCSMessage(data);
	}

	@Override
	public String UndoCSMessage(String data) {
		return cSChatApiService.UndoCSMessage(data);
	}

	@Override
	public String CSInit(String data) {
		// TODO Auto-generated method stub
		return cSUserApiService.CSInit(data);
	}

	@Override
	public String GetCSTargetID(String data) {
		// TODO Auto-generated method stub
		return null;
	}
}
